#include<iostream>
#include<boost/xpressive/xpressive.hpp>

using namespace boost::xpressive;

int main()
{
  std::string hell("hello world");

  sregex rex = sregex::complie("(\\w+) (\\w+)!");
  smatch what;

  if(regex_match(hello,what,rex))
    {
      std::cout<<what[0]<<'\n';
      std::cout<<what[1]<<'\n';
      std::cout<<what[2]<<'\n';
    }

  return 0;
}
